package com.bc.trade.noitfy;


import com.bc.trade.model.TradeOrder;

/**
 * 后台通知商户
 * @author zhongzhanfeng
 *
 */
public class NotifyReq {
	private String version;
	private String orgCode;
	private String merchCode;
	private String payType;
	private String orderNo;
	private String merchOrderNo;
	private String amount;
	private String createTime;
	private String payTime;
	private String remark;
	private String respCode;
	private String respMsg;
	private String sign;
	
	//不在报文体内
	private transient String notifyUrl;

	public NotifyReq(TradeOrder tradeOrder) {
		this.version = "V1.0";
		this.merchCode = tradeOrder.getMerchCode();
		this.orderNo = tradeOrder.getOrderNo();
		this.merchOrderNo = tradeOrder.getMerchOrderNo();
		this.payType = tradeOrder.getPayType();
		this.amount = String.valueOf(tradeOrder.getAmount());
		this.createTime = tradeOrder.getCreateTime();
		this.payTime = tradeOrder.getPayTime();
		this.orgCode = tradeOrder.getOrgCode();
		this.notifyUrl = tradeOrder.getNotifyUrl();
		this.respCode = tradeOrder.getRespCode();
		this.respMsg = tradeOrder.getRespMsg();
		this.remark = tradeOrder.getRemark();
	}
	
	public void setCodeAndMsg(String code,String msg){
		this.respCode = code;
		this.respMsg = msg;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

	public String getMerchCode() {
		return merchCode;
	}

	public void setMerchCode(String merchCode) {
		this.merchCode = merchCode;
	}

	public String getPayType() {
		return payType;
	}

	public void setPayType(String payType) {
		this.payType = payType;
	}

	public String getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}

	public String getMerchOrderNo() {
		return merchOrderNo;
	}

	public void setMerchOrderNo(String merchOrderNo) {
		this.merchOrderNo = merchOrderNo;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getPayTime() {
		return payTime;
	}

	public void setPayTime(String payTime) {
		this.payTime = payTime;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getRespCode() {
		return respCode;
	}

	public void setRespCode(String respCode) {
		this.respCode = respCode;
	}

	public String getRespMsg() {
		return respMsg;
	}

	public void setRespMsg(String respMsg) {
		this.respMsg = respMsg;
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	public String getNotifyUrl() {
		return notifyUrl;
	}

	public void setNotifyUrl(String notifyUrl) {
		this.notifyUrl = notifyUrl;
	}
	
}
